import  yagmail

print("x")
#yagmail.register('test@huodao.hk', 'Zhaoliangji2017')

yag = yagmail.SMTP(user='test@huodao.hk', password='Zhaoliangji2017', smtp_starttls=True, host='smtp.exmail.qq.com', port=587)
yag.send()
print('x')
yag.send(to=['1027480600@qq.com','wangyong1027480@163.com'],subject='测试',contents=['it is a test mail'])

print("mail sent ")